try:
    password = input("请输入你的密码：")
    if len(password) < 8:
        raise Exception("密码长度低于8位数，请重新输入。")
except Exception as e:
    print(e)